#include "common.h"

// Created by chen on 2023/5/13.
//
// 职工类
class Employee{
public:
    virtual void work(){}
    int id;
    string name;
    int level;       // 等级，每个等级代表不一样 1-3 老板，经理，普通雇员
    virtual ~Employee(){}
};

// 老板类
class Boss: public Employee{
public:
    Boss(int i_id, string i_name){
        id = i_id;
        name = i_name;
        level = 1;
    }
    void work(){
        cout << "管理公司的所有事务";
    }
};

// 经理类
class Manager: public Employee{
public:
    Manager(int i_id, string i_name) {
        id = i_id;
        name = i_name;
        level = 2;
    }
    void work(){
        cout << "完成老板交给的任务，并下发任务给员工";
    }
};

// 普通雇员类
class Staff: public Employee {
public:
    Staff(int i_id, string i_name) {
        id = i_id;
        name = i_name;
        level = 3;
    }
    void work(){
        cout << "完成经理交给的任务";
    }
};
